function main() {
    const self = this;
    let userId = self.$$("text_input_gv5f73").cValue;
    if (!userId || userId === null || userId === '') {
        api.EXEC_FORMULA("ENTITY_SELECT_ONE('t_e69c06ae33524ff78d2599e080b5b38d',id,QUERY_EQ('human_uuid',USER_ID()))").then(function (response) {
            resolve(response.result);
            userId = response.result;
            self.$$("text_input_gv5f73").cValue = userId;
        });

    }



    let nowTime = self.$$("date_picker_eih638").cValue;
    if (!nowTime || nowTime === null || nowTime === '') {
        nowTime = formatChinaTime();
        self.$$("date_picker_eih638").cValue = nowTime;

    }
}

function formatChinaTime() {
    const options = {
        timeZone: 'Asia/Shanghai',
        year: 'numeric',
        month: '2-digit',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit',
        second: '2-digit',
        hour12: false
    };

    const formatter = new Intl.DateTimeFormat('zh-CN', options);
    const parts = formatter.formatToParts(new Date());

    const year = parts.find(p => p.type === 'year').value;
    const month = parts.find(p => p.type === 'month').value;
    const day = parts.find(p => p.type === 'day').value;
    const hour = parts.find(p => p.type === 'hour').value;
    const minute = parts.find(p => p.type === 'minute').value;
    const second = parts.find(p => p.type === 'second').value;

    return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}

